<link href="/css/login.css" rel="stylesheet"/>
<link href="/css/login-style.css" rel="stylesheet"/>
<link href="/css/animate-login.css" rel="stylesheet"/>
<link href="/css/animate-custom.css" rel="stylesheet"/>

<div class="container">
    <!-- Codrops top bar -->
    <header>
        <h1>Open your timeshelf with <span>my9time</span> now!</h1>
    </header>
    <section data-ng-controller="RecoverPasswordController">
        <div class="col-xs-12">
            <center>
                <!-- oauth -->
                <!-- google -->
                <a href="/auth/google" id="oauthGoogle">
                    <img height="40" width="170" src="/img/oauth/google.png"
                         style="margin-bottom:20px;display: inherit"/>
                </a>
                <!-- facebook -->
                <a href="/auth/facebook" id="oauthFacebook">
                    <img height="40" width="170" src="/img/oauth/facebook.png"
                         style="margin-bottom:20px;display: inherit"/>
                </a>
            </center>
        </div>
        <div id="container_login">
            <div id="wrapper">
                <div>
                    <div id="login" class="animate form auth-form-animation">
                        <div data-ng-show="invalidToken">
                            <h3>{{tokenError}}</h3>
                            <hr/>
                            <a href="/recovery">Try again</a>
                        </div>
                        <div data-ng-show="passwordReseted && !isError">
                            <h3>Your password is changed successfully. <a href="/login">Sign in</a> to have a nice time with us.</h3>
                        </div>
                        <div class="alert alert-danger" ng-show="isError">
                            <span ng-bind="error"></span>
                        </div>
                        <form name="changePassword" novalidate mi-submit="resetPassword()" data-ng-show="!invalidToken && !passwordReseted">
                            <h1>Change password</h1>
                            <div class="form-group"
                                 ng-class="{'has-error':(changePassword|shouldDisplayError:changePassword)}">
                                <p>
                                <label for="password">New password</label>
                                <input type="password" name="password" id="password" placeholder="input password..."
                                       class="form-control"
                                       ng-model="input.password" required ng-minlength="6"/>
    <span class="help-block" data-ng-show="changePassword.password|shouldDisplayError:changePassword:'required'">
    Please input your new password
    </span>
    <span class="help-block" data-ng-show="changePassword.password|shouldDisplayError:changePassword:'min'">
    Your password must have more than 6 characters
    </span>
                                </p>
                            </div>
                            <div class="form-group"
                                 ng-class="{'has-error':(changePassword|shouldDisplayError:changePassword)}">
                                <label for="passwordConfirm">Confirm new password</label>
                                <input type="password" name="passwordConfirm" id="passwordConfirm"
                                       placeholder="input password..."
                                       class="form-control"
                                       ng-model="input.passwordConfirm" required/>
    <span class="help-block" data-ng-show="changePassword.password|shouldDisplayError:changePassword:'required'">
    Please confirm your new password
    </span>
    <span class="help-block"
          ng-show="isMatch() && changePassword.password.$dirty && changePassword.confirmPassword.$dirty">
    Your password doesn't match
    </span>
                            </div>
                            <p class="login button">
                                <input type="submit" class="btn" value="Save"/>
                            </p>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>

</div>

<script>
    $('#oauthGoogle').on('click', function () {
        window.location.replace('/auth/google');
    });
    $('#oauthFacebook').on('click', function () {
        window.location.replace('/auth/facebook');
    });

    removejscssfile("css/bootstrap/bootstrap.css", "css")

</script>

<!--<section data-ng-controller="RecoverPasswordController">-->
<!--<div data-ng-show="passwordReseted">-->
<!--<h3>Your password is changed successfully. <a href="/login">Sign in</a> to have a nice time with us.</h3>-->
<!--</div>-->

<!--<div data-ng-show="invalidToken">-->
<!--<h3>{{tokenError}}</h3>-->
<!--<hr/>-->
<!--<a href="/recovery">Try again</a>-->
<!--</div>-->

<!--<div data-ng-show="!invalidToken && !passwordReseted">-->
<!--<div class="alert alert-danger" ng-show="isError">-->
<!--<span ng-bind="error"></span>-->
<!--</div>-->
<!--<h3>Change password</h3>-->
<!--<form name="changePassword" novalidate mi-submit="resetPassword()">-->
<!--<div class="form-group" ng-class="{'has-error':(changePassword|shouldDisplayError:changePassword)}">-->
<!--<label for="password">New password</label>-->
<!--<input type="password" name="password" id="password" placeholder="input password..." class="form-control"-->
<!--ng-model="input.password" required ng-minlength="6"/>-->
<!--<span class="help-block" data-ng-show="changePassword.password|shouldDisplayError:changePassword:'required'">-->
<!--Please input your new password-->
<!--</span>-->
<!--<span class="help-block" data-ng-show="changePassword.password|shouldDisplayError:changePassword:'min'">-->
<!--Your password must have more than 6 characters-->
<!--</span>-->
<!--</div>-->
<!--<div class="form-group" ng-class="{'has-error':(changePassword|shouldDisplayError:changePassword)}">-->
<!--<label for="passwordConfirm">Confirm new password</label>-->
<!--<input type="password" name="passwordConfirm" id="passwordConfirm" placeholder="input password..." class="form-control"-->
<!--ng-model="input.passwordConfirm" required/>-->
<!--<span class="help-block" data-ng-show="changePassword.password|shouldDisplayError:changePassword:'required'">-->
<!--Please confirm your new password-->
<!--</span>-->
<!--<span class="help-block" ng-show="isMatch() && changePassword.password.$dirty && changePassword.confirmPassword.$dirty">-->
<!--Your password doesn't match-->
<!--</span>-->
<!--</div>-->
<!--<button type="submit" class="btn btn-primary">Save</button>-->
<!--</form>-->
<!--</div>-->
<!--</section>-->
